<?php
if(!defined('BZ_XTBLOG') || !defined('BZ_WJSCUZ')) {
	exit('Access Denied');
}
$fid =verify_id($_GET['fid']);
$act =$_GET['act'];
if($act == 'huo'){
		    $huo=$db->get_one('forum_hui'," `id` ='$fid'",'');
        $hid=$fid;
        $fid=$huo[fid];
}
$forum=$db->get_one('forum'," `id` ='$fid' AND `sz_sc` ='0'",'');
$forumlt=$db->get_one('forum_class'," `id` ='$forum[cid]'",'');
$user_czqx=$user_class->user_qx('forum',$forum[id],$user_uid);
$wzxx_title =$forum[name].'-帖子管理-'.$wzxx_title.'';
$wzxx_gj    =$wzcontent.'-帖子管理-'.$wzxx_gj.'';
$wzxx_ms    =$wzcontent.'-帖子管理-'.$wzxx_ms.'';
     $ltid  =$forumlt[id];
     $ltname=$forumlt[name];
     $forum_id=$forum[id];
     $forum_name=$forum[name];
  if(!$user_uid){
		$pdid='1';
	}else if(!$forum or !$forumlt){
		$pdid='2';
	}else if($user_czqx < '1' ){
		$pdid='3';
	}else if($act == 'huo'){
        if($db->get_one('forum_hui'," `id` ='$hid' AND `gl` ='1'",'')){
        	  $db->update('forum_hui',array('gl' => 0)," `id` ='$hid'");
        }else{
         	  $db->update('forum_hui',array('gl' => 1)," `id` ='$hid'");
        }
      $pdid='4';
	}else if($act == 'sc'){
      $pdid='20';
	}else if($act == 'scok'){
        if($db->get_one('forum'," `id` ='$fid'",'')){
        	  $db->update('forum',array('sz_sc' => 1 ),"`id` ='$fid'");
        }
      $pdid='21';
	}else if($act == 'xgok'){
		    if($_POST[name] && $_POST[content]){ 	 
           $db->update('forum',array('cid' => $_POST[bank] ,'nameys' => $_POST[namey] ,'name' => $_POST[name],'content' => $_POST[content],'type_suo' => $_POST[suo] ,'type_jin' => $_POST[jh] ,'cun' => $_POST[tc],'type_din' => $_POST[din])," `id` ='$fid'");
           Bingz_cache_html_delete('forum','forum_'.$fid.'');
        }
        $pdid='30';
	}else{
     $forum_name     =Bingz_html($forum[name]);
     $forum_content  =Bingz_html($forum[content]); 
     if($forum[type_din] == '1'){ $syxsaa="CHECKED "; }else if($forum[type_din] == '2'){ $syxsab="CHECKED "; }else if($forum[type_din] == '3'){ $syxsac="CHECKED "; }else{ $syxsa="CHECKED "; }
     if($forum[type_suo] == '1'){ $ssuob="CHECKED "; }else{ $ssuoa="CHECKED "; }
     if($forum[type_jin] == '1'){ $jhb="CHECKED "; }else{ $jha="CHECKED "; }
     if($forum[cun] == '1'){ $tcb="CHECKED "; }else{ $tca="CHECKED "; }
 
        $sql_li=$db->query('forum_class'," `type` = '1' ORDER BY `fid`",'');
        while($row_c=mysql_fetch_array($sql_li)){
	             $forumlb[]= array("id"=>"$row_c[id]","name"=>"$row_c[name]");
        }
        $forum_id  =$forum[fid];
        $lz_uid    =$forum[uid];
        $lz_name   =$user_class->user_name($forum[uid]);
 
      $ltflsz =$forumlt[sz_fl];
      $yffll=$db->get_one('forum_tzfl'," `fid` ='$forum[cid]' AND `id` ='$forum[fid]'",'');
      $yflid=$forum[fid];
      $yflname=$yffll[name];
      $tzfl=$db->query('forum_tzfl'," `fid` ='$forum[cid]' ORDER BY `px` ",'');
      while($fl=mysql_fetch_array($tzfl)){
            $ltfl[]= array("fid"=>"$fid","id"=>"$fl[id]","name"=>"$fl[name]");
      }
  }
@include template('head');
@include template('forum/forum_admingo');
@include template('foot');
?>